package com.bdqn.t308.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.AbstractCollection;

@Controller
@RequestMapping("/spring")
@Scope("prototype")
public class HelloSpringMVCController {

    @RequestMapping("/hello")
    public String hello(){

        return "redirect:/test";
    }

    @RequestMapping("/test")
    public String test(String naMe,String pwd){

        System.out.println("用户名："+naMe+"，密码："+pwd);
        return "test";
    }


}
